<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body>div {
            width: 200px;
            height: 200px;
            background-color: red;
            overflow: hidden;/*解决粘连问题*/
        }
        div>div{
            width: 100px;
            height: 100px;
            background-color: blue;
            margin-left: 50px;
            /*当元素上边缘和上级元素上边缘重叠时给元素添加上外边距
            会出现粘连问题在上级元素中添加overflow : hidden解决*/
            margin-top: 50px;
        }
    </style>
</head>
<body>
<div>
    <div></div>
</div>

</body>
</html>